package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * 请求参数限定
 * @author stone
 * @date 2022/04/29 15:04
 */
@RequestMapping("account")
@Controller
public class AccountController {

    //localhost:8080/transfer?fromId=1&destId=2&money=1000
    //@RequestMapping(value = "transfer",params = "fromId") //该请求一定要携带请求参数fromId
    @RequestMapping(value = "transfer",params = {"fromId","destId"}) //该请求一定要携带请求参数fromId和destId
    @ResponseBody
    public String transfer() {

        return "ok";
    }
}
